package top.yehot.kettle.boot.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;
import top.yehot.cmm.util.core.enums.BaseEnum;

@Getter
@AllArgsConstructor
public enum KettleResEnum implements BaseEnum {
	
	repBasePath_vali(11000, "资源库名称不能为空或NULL"),
	dbType_vali(11001, "数据库类型不能为空或NULL"),
	dbAccess_vali(11002, "数据库访问模式不能为空或NULL"),
	dbHost_vali(11003, "数据库主机名或IP地址不能为空或NULL"),
	dbPort_vali(11004, "数据库端口号不能为空或NULL"),
	dbName_vali(11005, "数据库名称不能为空或NULL"),
	dbUsername_vali(11006, "数据库登录账号不能为空或NULL"),
	dbPassword_vali(11007, "数据库登录密码不能为空或NULL"),
	
	DB_TYPE_NOT_EXIST(21000, "kettle-数据库类型不存在"),
	REPOSITORY_NOT_EXIST(21001, "kettle-资源库不存在"),
	DIR_NAME_EXIST(21002, "kettle-目录名称已存在"),
	DIR_CHIRED_EXIST(21003, "kettle-当前目录存在子目录或脚本，不允许删除"),
	
	TASK_NOT_MODIFY(21100, "task-请暂停任务再修改"),
	TASK_UNABATED_NOT_DELETE(21101, "task-任务未停止,不能删除"),
	TASK_RUN_STATUS(21102, "task-任务已经在运行"),
	TASK_STOP_STATUS(21103, "task-任务已经停止"),
	CRON_ERR(21104, "task-解析cron失败"),
	
	DB_REPOSITORY_CONNECTION_ERR(31000, "kettle-连接数据库资源库失败"),
	FILE_REPOSITORY_NOT_EXIST(31001, "kettle-文件资源库路径不存在或不是文件夹"),
	FILE_REPOSITORY_CONNECTION_ERR(31002, "kettle-连接文件资源库失败"),
	WRITE_REPOSITORY_XML_ERR(31003, "kettle-资源库持久化到文件repositories.xml失败"),
	RESTART_CONNECTION_ERR(31004, "kettle-重连资源库失败"),
	CONNECTION_REPOSITORY_ERR(31005, "kettle-链接资源库失败"),
	READ_REPOSITORY_DB_INFO_ERR(31006, "kettle-读取数据库信息失败"),
	REPO_LINK_DB_EMPTY(31007, "kettle-资源库未连接数据库"),
	SHARED_DB_ERR(31008, "kettle-共享数据库失败"),
	DIR_ERR(31009, "kettle-查询资源库树失败"),
	DIR_CREATE_ERR(31010, "kettle-创建目录失败"),
	DIR_MODIFY_ERR(31011, "kettle-修改目录失败"),
	DIR_DELETE_ERR(31012, "kettle-删除文件夹失败"),
	GET_REPO_ERR(31013, "kettle-获取资源库信息失败"),
	GET_SCRIPT_INFO_ERR(31014, "kettle-获取资源库下文件信息失败"),
	DELETE_SCRITP_ERR(31015, "kettle-删除文件失败"),
	UPLOAD_SCRIPT_ERR(31016, "kettle-上传文件失败"),
	FILE_NAME_EXIST(31017, "kettle-文件名称已存在"),
	RENAME_SCRIPT_ERR(31018, "kettle-重命名文件失败"),
	
	QUARTZ_TRIGGER_STATE_ERR(31100, "task-获取触发器状态失败"),
	QUARTZ_BIND_JOB_TRIGGER_ERR(31101, "task-绑定触发器和调度任务失败"),
	QUARTZ_DEL_TASK_ERR(31102, "task-停止定时任务失败"),;

	private Integer status;
	private String msg;
	
}
